-
Notifications
You must be signed in to change notification settings - Fork 9
Auto-attach recently viewed charms and add listRecent() tool
#1986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-attach recently viewed charms and add listRecent() tool
#1986
Conversation
and introduce `listRecent` tool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 2 files
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="packages/patterns/chatbot.tsx">
<violation number="1" location="packages/patterns/chatbot.tsx:459">
Auto-attached charms rendered by the bar can no longer be removed: the bar now reads from attachmentsWithRecent, but removeAttachment still mutates only the base allAttachments cell, so deleting the auto entry is impossible and the chip reappears immediately.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
| <ct-hstack align="center" gap="1"> | ||
| <ct-attachments-bar | ||
| attachments={allAttachments} | ||
| attachments={attachmentsWithRecent} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto-attached charms rendered by the bar can no longer be removed: the bar now reads from attachmentsWithRecent, but removeAttachment still mutates only the base allAttachments cell, so deleting the auto entry is impossible and the chip reappears immediately.
Prompt for AI agents
Address the following comment on packages/patterns/chatbot.tsx at line 459:
<comment>Auto-attached charms rendered by the bar can no longer be removed: the bar now reads from attachmentsWithRecent, but removeAttachment still mutates only the base allAttachments cell, so deleting the auto entry is impossible and the chip reappears immediately.</comment>
<file context>
@@ -389,7 +456,7 @@ export default recipe<ChatInput, ChatOutput>(
<ct-hstack align="center" gap="1">
<ct-attachments-bar
- attachments={allAttachments}
+ attachments={attachmentsWithRecent}
removable
onct-remove={removeAttachment({ allAttachments })}
</file context>
* Auto-attach currently viewed charm and introduce `listRecent` tool * Make system prompt customizable for `chatbot.tsx`
chatbot.tsxSummary by cubic
Auto-attaches the most recently viewed charm to each chat and adds a listRecent tool so the assistant can pull in recent items without extra clicks, addressing Linear CT-1013. The chatbot system prompt is now configurable; Omnibox keeps the previous behavior by passing the existing prompt.